<?php echo $this->render('header.phtml');?>
<div id="main2"> 
      <div id="content"> 
        <div class="blog" > 
          <div class="blogbody">
<?php 
    foreach ($this->index_article as $row):
?>
              <div class="articletext">
                <h3 class="title"><a href="<?=$this->baseUrl?>/article?id=<?=$row["art_id"]?>"><?php echo $row["art_title"]; ?></a></h3>
                <div class="innertext"> 
					摘要: <?php 
					$art_contents = htmlspecialchars_decode($row["art_content"],ENT_QUOTES);
					echo strlen($art_contents)>600 ? remove_html_tag(mb_substr($art_contents,0,200,'utf-8')).'...' : $art_contents ; ?> <a href="<?=$this->baseUrl?>/article?id=<?=$row["art_id"]?>">(阅读全文)</a>
                </div>
				 <div class="posted">于 <?php echo date('Y-m-d',$row["art_put_time"]); ?> 发表
                | <a href="<?=$this->baseUrl?>/article?id=<?=$row["art_id"]?>&do=com">我要评论(<?=$row["art_com_count"]?>)</a> | 阅读次数(<?=$row["art_count"]?>) | 所属分类：<a href="<?=$this->baseUrl?>/artlist?cid=<?=$row["art_classid"]?>"><?php echo $row["class_name"]; ?></a></div>
                <br clear="all" />
              </div>
             
<?php 
	endforeach; 
?>			  

			 
          </div>
         
        <div class="replay" style="background-color:#F5F5F5;width:100%;">
		<table border="0" cellpadding="0" style="border-style:solid; border-width:1px; padding:1px; border-collapse: collapse" bordercolor="#CCCCCC" width="850" height="184">
		<tr><td colspan="2" style="background:url(<?=$this->styleurl?>/images/menu.gif);padding-left:20px;padding-top:5px;font-size:15px;"><b>快速留言</b></td></tr>
		<form action="<?=$this->baseUrl?>/message/addmes" method="POST" style="margin:0px; padding:0px;">
		<tr>
		<td width="96" height="20">
		  <div align="right" style="font-size:12px">用户名：</div></td>
		<td height="20"><input type="text" name="mes_writer" size="16" maxlength="50" />
		&nbsp;&nbsp;
		  <input disabled  readonly="readonly"   type="text"   name="remLen"   size="4"   maxlength="3"   value="100" />个字符</td>
		</tr>
		<tr>
		<td width="96" height="40">
		  <div align="right" style="font-size:12px">验证码：</div></td>
		<td height="30">
		<input type="text" name="verify" size="12" style="height:25px" value="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<img onclick="change_verify()" id="verify_img" src="/verify?r=<?php echo rand(0,10000);?>" height="30" width="90" style="vertical-align: middle;">
		</td>
		</tr>
		<tr>
		<td width="96" height="71">
		    <SCRIPT   LANGUAGE="JavaScript">   
		  <!--//   
		  function   textCounter(field,   countfield,   maxlimit)   {   
		  //   定义函数，传入3个参数，分别为表单区的名字，表单域元素名，字符限制；   
		  if   (field.value.length   >   maxlimit)     
		  //如果元素区字符数大于最大字符数，按照最大字符数截断；     
		  field.value   =   field.value.substring(0,   maxlimit);   
		  else   
		  //在记数区文本框内显示剩余的字符数；     
		  countfield.value   =   maxlimit   -   field.value.length;   
		  }
		  function change_verify(){
		  	var img = document.getElementById("verify_img");
			img.src = "/verify?r="+ Math.random();
		  }
		  //-->   
		  </SCRIPT>   
		    
		    <div align="right" style="font-size:12px">留言内容：</div></td>
		<td height="71"><textarea rows="4" name="mes_content" cols="50" onKeyDown="textCounter(this.form.mes_content,this.form.remLen,100);"   onKeyUp="textCounter(this.form.mes_content,this.form.remLen,100);"></textarea>
		</tr>
		<tr>
		<td height="30" colspan="2">
		  <div align="center">
		    <input type="submit" value="留言" name="hf">
		    <input name="action" type="hidden" id="action" value="add">
		  </div></td>
		</tr>
		<tr>
		<td colspan="2">
		<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
		
		<tr><td width="100%" height="1" colspan="4"></td></tr>
		</table>      	</td>
		</tr>
		</form>
		</table>
      </div>
          
          
		  <div class="tags" style="margin-top:50px;">
		  网站标签:<br />
		 <?php 
   			foreach ($this->tags as $row):
		?>
				 <a href="<?=$this->baseUrl?>/taglist?tid=<?=$row['tag_id']?>"><?php echo $row["tag_name"] ?></a>
		<?php 
		endforeach;
		?>
		  </div>

		  <div id=link class="info">
		  友情链接:<br />
		<a href="http://www.houxian.com.cn" target="_blank">无穷积分</a>  <a href="http://yourkey0218.blog.163.com" target="_blank">yourkey0218-不迷路</a>
		  </div>
        </div>
      </div>
      <?php echo $this->render("left.phtml");?>      
    </div>

<?php 
echo $this->render('foot.phtml');
?>
</body> 
</html>